﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;

namespace BEX.Core.Exchange.BITSTAMP
{
    public class BitstampResponse
    {
        public BitstampResponse(string json)
            : this(JObject.Parse(json))
        {
        }

        private JObject __jobject;
        public BitstampResponse(JObject obj)
        {
            this.__jobject = obj;
        }

        public string high
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "high"));
            }
        }

        public string last
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "last"));
            }
        }

        public string timestamp
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "timestamp"));
            }
        }

        public string bid
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "bid"));
            }
        }

        public string volume
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "volume"));
            }
        }

        public string low
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "low"));
            }
        }

        public string ask
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "ask"));
            }
        }
    }
}
